package com.ukao.steward.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;


/**
 * Created by ukaodev on 2017/8/26.
 */

public  class MyFragmentAdapter extends FragmentPagerAdapter {
    private  List<Fragment>  fragments;
    public MyFragmentAdapter(FragmentManager fm, List<Fragment>  fragments) {
        super(fm);
        this.fragments=fragments;
    }
    @Override
    public Fragment getItem(int position) {
        return  fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
